Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
multi-buffer-data-view
Advanced tools
A wrapper around the native DataView which can handle multiple ArrayBuffers.
A wrapper around the native DataView which can handle multiple ArrayBuffers.
This module provides a wrapper around the native DataView. But instead of supporting only one ArrayBuffer as the backing memory the MultiBufferDataView
exported by this module can operate across multiple ArrayBuffers.
The multi-buffer-data-view
module is available on npm and can be installed as usual.
npm install multi-buffer-data-view
It exports only one class called MultiBufferDataView
which can be imported like this:
import { MultiBufferDataView } from 'multi-buffer-data-view';
A MultiBufferDataView
behaves almost like a native DataView with the notable exception that it can handle multiple ArrayBuffers.
const anArrayBuffer = new ArrayBuffer(23);
const anotherArrayBuffer = new ArrayBuffer(41);
new MultiBufferDataView([anArrayBuffer, anotherArrayBuffer]);
The little example above will create a MultiBufferDataView
which uses all 64 bytes that are available in the given ArrayBuffers. However it is also possible to limit the range of accessible bytes by providing a byteOffset
or a byteLength
as additional arguments.
new MultiBufferDataView([anArrayBuffer, anotherArrayBuffer], 12, 24);
When creating a MultiBufferDataView
with the parameters above it will only use the last 11 bytes of the first ArrayBuffer and the first 13 bytes of the second ArrayBuffer.
FAQs
A wrapper around the native DataView which can handle multiple ArrayBuffers.
The npm package multi-buffer-data-view receives a total of 38,194 weekly downloads. As such, multi-buffer-data-view popularity was classified as popular.
We found that multi-buffer-data-view demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.